<template>
  <!-- 详情 -->
  <el-dialog title="费用配置详情" :visible.sync="dialogVisible" width="50%" append-to-body :close-on-click-modal="false"
             :before-close="closedialog">
    <el-descriptions :column="2" border>
      <el-descriptions-item>
        <template slot="label">
          场所代码
        </template>
        {{ form.fieldCode }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所名称
        </template>
        {{ form.fieldCode }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所名称
        </template>
        {{ form.fieldName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          进出口类型
        </template>
        <dict-tag :options="dict.type.sys_i_e_flag" :value="form.ieFlag"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          车型
        </template>
        <dict-tag :options="dict.type.fee_vehicle_type" :value="form.veType"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          业务类型
        </template>
        <dict-tag :options="dict.type.estimate_businuss_type" :value="form.businessType"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          费用类型
        </template>
        <dict-tag :options="dict.type.charge_charge_Type" :value="form.feeType"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          收费单价
        </template>
        {{ form.chargePrice }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          计费单位
        </template>
        {{ form.chargeUnit }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          启停用状态
        </template>
        <dict-tag :options="dict.type.start_stop_status" :value="form.status"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建者
        </template>
        {{ form.createBy }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建时间
        </template>
        {{ form.createTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          更新者
        </template>
        {{ form.updateBy }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          更新时间
        </template>
        {{ form.updateTime }}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center;">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import {getFeeConfig} from "@/api/miniapp/FeeConfig";

export default {
  props: {
    dict: {}
  },
  data() {
    return {
      //显示详情
      dialogVisible: false,
      form: {
        id: null,
        fieldCode: null,
        fieldName: null,
        ieFlag: null,
        veType: null,
        businessType: null,
        feeType: null,
        chargePrice: null,
        chargeUnit: null,
        status: "0",
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      }
    }
  },
  methods: {
    open(row) {
      this.dialogVisible = true;
      this.loadDetail(row);
    },
    closedialog() {
      this.dialogVisible = false
    },
    // 获取详情
    loadDetail(row) {
      getFeeConfig(row.id).then((res) => {
        if (res.code == 200) {
          this.form = res.data;
        }
      });
    },
  }
};
</script>

<style>

</style>
